function LoadDefaultValues(obj)
%DEFAULTVALUES Summary of this function goes here
%   Detailed explanation goes here

    %% Current Settings
    CurrentSettings.BxCtrlDC = struct(...
                          'device',  'ziSlave', ...
                          'channel', 'AuxOut', ...
                          'index',   '0', ...
                          'volt',    7.97); % [V] 7.97V \approx 400mA
    CurrentSettings.BxCtrlAC = struct(...
                          'device',  'ziMaster', ...
                          'channel', 'SigOut', ...
                          'index',   '0' );

    CurrentSettings.ByCtrlDC = struct(...
                          'device',  'ziMaster', ...
                          'channel', 'AuxOut', ...
                          'index',   '2', ...
                          'volt',    1.0);
    CurrentSettings.ByCtrlAC = struct(...
                          'device',  'none', ...
                          'channel', 'none', ...
                          'index',   'none' );
    
    CurrentSettings.BzCtrlDC = struct(...
                          'device',  'ziMaster', ...
                          'channel', 'AuxOut', ...
                          'index',   '3', ...
                          'volt',    3.95); % Anti-Current set to 10 mA (Z9 coil)
    CurrentSettings.BzCtrlAC = struct(...
                          'device',  'ziSlave', ...
                          'channel', 'SigOut', ...
                          'index',   '0' ); %#ok<*STRNU>
    
    %% Modulation
    ModSettings.RbModulation = struct(...
                          'device',    'ziMaster', ...
                          'channel',   'SigOut', ...
                          'oscillator','0', ...
                          'frequency', 92.0e3, ...
                          'index',     '0', ...                          
                          'amplitude', 8.0 );

	ModSettings.Xe129Modulation = struct(...
                          'device',    'ziSlave', ...
                          'channel',   'SigOut', ...
                          'oscillator','0', ...
                          'frequency', 280.0, ...
                          'index',     '0', ...
                          'amplitude', 0.015 );

	ModSettings.Xe131Modulation = struct(...
                          'device',    'ziSlave', ...
                          'channel',   'SigOut', ...
                          'oscillator','1', ...
                          'frequency', 80.0, ...
                          'index',     '1', ...
                          'amplitude', 0.040 );

	ModSettings.CalibrationModulation = struct(...
                          'device',    'ziSlave', ...
                          'channel',   'SigOut', ...
                          'oscillator','2', ...
                          'frequency', 40.0, ...
                          'index',     '2', ...
                          'amplitude', 0.100 );
    
	%% Demodulation
    DemodSettings.ByDemodFast = struct(...
                          'device',    'ziMaster', ...
                          'channel',   'demod', ...
                          'index',     '1', ...
                          'order',     4, ...     % ?
                          'bandwidth', 1000.0, ... % ?
                          'rate',      3.348e3);

    DemodSettings.ByDemodSlow = struct(...
                          'device',    'ziMaster', ...
                          'channel',   'demod', ...
                          'index',     '2', ...
                          'order',     8, ...
                          'bandwidth', 2.348, ...
                          'bandwidth1', 20.35, ...
                          'rate',      3.348e3);

	DemodSettings.BzDemodSlow = struct(...
                          'device',    'ziMaster', ...
                          'channel',   'demod', ...
                          'index',     '3', ...
                          'order',     8, ...
                          'bandwidth', 2.348, ...
                          'bandwidth1', 20.35, ...
                          'rate',      3.348e3);
                      
    DemodSettings.CalibrationDemod = struct(...
                          'device',    'ziMaster', ...
                          'channel',   'demod', ...
                          'index',     '1', ...
                          'order',     8, ...
                          'bandwidth', 100.0, ...
                          'rate',      3.348e3);
    % Slave Machine
	DemodSettings.Xe129Demod = struct(...
                          'device',    'ziSlave', ...
                          'channel',   'demod', ...
                          'index',     '2', ...
                          'order',     8, ...
                          'bandwidth', 100.0, ...
                          'rate',      3.348e3);

	DemodSettings.Xe131Demod = struct(...
                          'device',    'ziSlave', ...
                          'channel',   'demod', ...
                          'index',     '3', ...
                          'order',     8, ...
                          'bandwidth', 100.0, ...
                          'rate',      3.348e3);
                      
	%% PID Feedback
    % Transverse Field Locking: calculated by PID Adviser, all pass model,
    % with gain = 86m, 278m, and Target BW = 1 Hz.
    PIDSettings.ByLock = struct(...
                          'device',    'ziMaster', ...
                          'channel',   'pid', ...
                          'index',     '0', ...
                          'mode',      'PIDF', ...
                          'input',     'ByDemodSlow', ...
                          'output',    'ByCtrlDC', ...
                          'setpoint',  0.0, ...
                          'center',    0.0, ...
                          'upper',     0.5, ...
                          'lower',     -0.5, ...
                          'order',     8, ...
                          'bandwidth', 2.348, ...
                          'harmonic',  1, ...
                          'p',         0.8220, ...% 10.94, ...
                          'i',         8.1969, ...% 90.22, ...
                          'd',         0.0328, ...% 458.1e-3, ...
                          'dlim',      116.6e3, ...
                          'rate',      16.74e3);
                    
    PIDSettings.BzLock = struct(...
                          'device',    'ziMaster', ...
                          'channel',   'pid', ...
                          'index',     '1', ...
                          'mode',      'PIDF', ...
                          'input',     'BzDemodSlow', ...
                          'output',    'BzCtrlDC', ...
                          'setpoint',  0.0, ...
                          'center',    0.0, ...
                          'upper',     0.5, ...
                          'lower',     -0.5, ...
                          'order',     8, ...
                          'bandwidth', 2.348, ...
                          'harmonic',  1, ...
                          'p',         0.8220, ...% 3.385, ...
                          'i',         8.1969, ...% 27.91, ...
                          'd',         0.0328, ...% 141.7e-3, ...
                          'dlim',      116.6e3, ...
                          'rate',      16.74e3);
    
	% NMR Frequency PLL: 
	PIDSettings.Xe129Lock = struct(...
                          'device',      'ziSlave', ...
                          'channel',     'pid', ...
                          'index',       '0', ...
                          'mode',        'pll', ...
                          'input',       'Xe129Demod', ...
                          'output',      'Xe129Modulation', ...
                          'setpoint',    0.0, ...
                          'phaseunwrap', 0, ...
                          'center',      230.3681, ...
                          'upper',       2.0, ...
                          'lower',       -2.0, ...
                          'order',       8, ...
                          'bandwidth',   20.35, ...
                          'harmonic',    1, ...
                          'p',           -0.1257, ...
                          'i',           -0.0097, ...
                          'd',           -0.0013, ...
                          'dlim',        1.335e3, ...
                          'rate',        16.74e3);
                    
	PIDSettings.Xe131Lock = struct(...
                          'device',      'ziSlave', ...
                          'channel',     'pid', ...
                          'index',       '1', ...
                          'mode',        'pll', ...
                          'input',       'Xe131Demod', ...
                          'output',      'Xe131Modulation', ...
                          'setpoint',    0.0, ...
                          'phaseunwrap', 0, ...
                          'center',      68.2896, ...
                          'upper',       2.0, ...
                          'lower',       -2.0, ...
                          'order',       8, ...
                          'bandwidth',   20.35, ...
                          'harmonic',    1, ...
                          'p',           -0.1257, ...
                          'i',           -0.0118, ...
                          'd',           -0.0013, ...
                          'dlim',        1.335e3, ...
                          'rate',        16.74e3);
    
	%% Conversion
    % x-direction
    BxDC_coeff = 2.43;  % [nT/mV] := (2.43 \pm 0.01) nT/mV, see Calibration Data 20190306
    Conversions.BxDC = struct(...
                          'CoilTurns',  5, ...               % ? need check
                          'Volt2Curr',  50.0, ...            % [mA/V] := 500mA full range / 10V
                          'Volt2Mag',   BxDC_coeff, ...      % [nT/mV] := (2.43 \pm 0.01) nT/mV, see Calibration Data 20190306
                          'Curr2Mag',   BxDC_coeff/0.05, ... % [nT/mA] := (48.54 \pm 0.11) nT/mA, see Calibration Data 20190306
                          ...
                          'Rb85Ratio',  BxDC_coeff*Constant.GyromagneticRatioRb85*1e3, ...   % [Hz/V] :=  2.43 nT/mV * 4.7 Hz/nT = 11.42 kHz/V
                          'Rb87Ratio',  BxDC_coeff*Constant.GyromagneticRatioRb87*1e3, ...   % [Hz/V] := 2.43 nT/mV * 7 Hz/nT = 17.01 kHz/V
                          'Xe129Ratio', BxDC_coeff*abs(Constant.GyromagneticRatioXe129), ... % [Hz/V] := 2.43 nT/mV * 11.84 mHz/nT = 28.78 Hz/V
                          'Xe131Ratio', BxDC_coeff*abs(Constant.GyromagneticRatioXe131), ... % [Hz/V] :=  2.43 nT/mV * 3.51 mHz/nT = 8.53 Hz/V
                          ...
                          'Rb85Ratio1',  BxDC_coeff*Constant.GyromagneticRatioRb85/0.050, ...   % [Hz/mA] := 228 Hz/mA
                          'Rb87Ratio1',  BxDC_coeff*Constant.GyromagneticRatioRb87/0.050, ...   % [Hz/mA] := 340 Hz/mA
                          'Xe129Ratio1', BxDC_coeff*abs(Constant.GyromagneticRatioXe129)/0.050, ... % [mHz/mA] := 576 mHz/mA
                          'Xe131Ratio1', BxDC_coeff*abs(Constant.GyromagneticRatioXe131)/0.050 ...  % [mHz/mA] := 171 mHz/mA
                          );
    Conversions.BxAC = struct(...
                          'CoilTurns',  5, ...         % ? need check
                          'Volt2Curr',  'n.a.');       % need calibration

    % y-direction
    ByDC_coeff = 0.08; % [nT/mV] := an estimated value (20190315)
    Conversions.ByDC = struct(...
                          'CoilTurns',  5, ...         % ? need check
                          'Volt2Curr',  20.0, ...      % [mA/V] := 200mA full range / 10V
                          'Volt2Mag',   ByDC_coeff, ...       % [nT/mV] := an estimation value (20190315)
                          'Curr2Mag',   ByDC_coeff/0.02, ...        % [nT/mA] := an estimation value (20190315)
                          ...
                          'Rb85Ratio',  ByDC_coeff*Constant.GyromagneticRatioRb85*1e3, ...   % [Hz/V] := 0.1 nT/mV * 4.7 Hz/nT = 0.47 kHz/V
                          'Rb87Ratio',  ByDC_coeff*Constant.GyromagneticRatioRb87*1e3, ...   % [Hz/V] := 0.1 nT/mV * 7 Hz/nT = 0.7 kHz/V
                          'Xe129Ratio', ByDC_coeff*abs(Constant.GyromagneticRatioXe129), ... % [Hz/V] := 0.1 nT/mV * 11.84 mHz/nT = 1.18 Hz/V
                          'Xe131Ratio', ByDC_coeff*abs(Constant.GyromagneticRatioXe131), ... % [Hz/V] := 0.1 nT/mV * 3.51 mHz/nT = 0.35 Hz/V
                          ...
                          'Rb85Ratio1',  ByDC_coeff*Constant.GyromagneticRatioRb85/0.020, ...   % [Hz/mA] := 23.5 Hz/mA
                          'Rb87Ratio1',  ByDC_coeff*Constant.GyromagneticRatioRb87/0.020, ...   % [Hz/mA] := 36 Hz/mA
                          'Xe129Ratio1', ByDC_coeff*abs(Constant.GyromagneticRatioXe129)/0.020, ... % [mHz/mA] := 59.2 mHz/mA
                          'Xe131Ratio1', ByDC_coeff*abs(Constant.GyromagneticRatioXe131)/0.020 ...  % [mHz/mA] := 17.6 mHz/mA
                          );
    Conversions.ByAC = struct(...
                          'CoilTurns',  'n.a.', ...
                          'Volt2Curr',  'n.a.');

    % z-direction
    BzDC_coeff = 2.31; % [nT/mV] := (2.31 \pm 0.07) nT/mV, see Calibration Data 20190306
    BzAC_coeff = BzDC_coeff/9.0; % [nT/mV] := an estimated value (20190315) by 2.31/9 = 0.256 nT/mV
    Conversions.BzDC = struct(...
                          'CoilTurns',  9, ...
                          'Volt2Curr',  20.0, ...            % [mA/V] := 200mA full range / 10V
                          'Volt2Mag',   BzDC_coeff, ...      % [nT/mV] := (2.31 \pm 0.07) nT/mV, see Calibration Data 20190306
                          'Curr2Mag',   BzDC_coeff/0.02, ...  % [nT/mA] := (115.6 \pm 3.6) nT/mA, see Calibration Data 20190306
                          ...
                          'Rb85Ratio',  BzDC_coeff*Constant.GyromagneticRatioRb85*1e3, ...   % [Hz/V] := 2.31 nT/mV * 4.7 Hz/nT = 10.86 kHz/V
                          'Rb87Ratio',  BzDC_coeff*Constant.GyromagneticRatioRb87*1e3, ...   % [Hz/V] := 2.31 nT/mV * 7 Hz/nT = 16.17 kHz/V
                          'Xe129Ratio', BzDC_coeff*abs(Constant.GyromagneticRatioXe129), ... % [Hz/V] := 2.31 nT/mV * 11.84 mHz/nT = 27.36 Hz/V
                          'Xe131Ratio', BzDC_coeff*abs(Constant.GyromagneticRatioXe131), ... % [Hz/V] := 2.31 nT/mV * 3.51 mHz/nT = 8.11 Hz/V
                          ...
                          'Rb85Ratio1',  BzDC_coeff*Constant.GyromagneticRatioRb85/0.020, ...   % [Hz/mA] := 542 Hz/mA
                          'Rb87Ratio1',  BzDC_coeff*Constant.GyromagneticRatioRb87/0.020, ...   % [Hz/mA] := 809 Hz/mA
                          'Xe129Ratio1', BzDC_coeff*abs(Constant.GyromagneticRatioXe129)/0.020, ... % [mHz/mA] := 1368 mHz/mA
                          'Xe131Ratio1', BzDC_coeff*abs(Constant.GyromagneticRatioXe131)/0.020 ...  % [mHz/mA] := 406 mHz/mA
                          );    
    Conversions.BzAC = struct(...
                          'CoilTurns',  1, ...
                          'Volt2Curr',  20.0, ...           % [mA/V] := 200mA full range / 10V
                          'Volt2Mag',   BzAC_coeff, ...     % [nT/mV] := an estimation value (20190315), 2.31/9 = 0.256 nT/mV
                          'Curr2Mag',   BzAC_coeff/0.02, ... % [nT/mA] := an estimation value (20190315), 12.8 nT/mA
                          ...
                          'Rb85Ratio',  BzAC_coeff*Constant.GyromagneticRatioRb85*1e3, ...   % [Hz/V] := 0.257 nT/mV * 4.7 Hz/nT = 1.21 kHz/V
                          'Rb87Ratio',  BzAC_coeff*Constant.GyromagneticRatioRb87*1e3, ...   % [Hz/V] := 0.257 nT/mV * 7 Hz/nT = 1.80 kHz/V
                          'Xe129Ratio', BzAC_coeff*abs(Constant.GyromagneticRatioXe129), ... % [Hz/V] := 0.257 nT/mV * 11.84 mHz/nT = 3.04 Hz/V
                          'Xe131Ratio', BzAC_coeff*abs(Constant.GyromagneticRatioXe131), ... % [Hz/V] := 0.257 nT/mV * 3.51 mHz/nT = 0.90 Hz/V
                          ...
                          'Rb85Ratio1',  BzAC_coeff*Constant.GyromagneticRatioRb85/0.020, ...   % [Hz/mA] := 60.3 Hz/mA
                          'Rb87Ratio1',  BzAC_coeff*Constant.GyromagneticRatioRb87/0.020, ...   % [Hz/mA] := 89.8 Hz/mA
                          'Xe129Ratio1', BzAC_coeff*abs(Constant.GyromagneticRatioXe129)/0.020, ... % [mHz/mA] := 152 mHz/mA
                          'Xe131Ratio1', BzAC_coeff*abs(Constant.GyromagneticRatioXe131)/0.020 ...  % [mHz/mA] := 45 mHz/mA
                          );    
	%%
    obj.CurrentSettings = CurrentSettings;
    obj.ModSettings     = ModSettings;
    obj.DemodSettings   = DemodSettings;
    obj.PIDSettings     = PIDSettings;
    obj.Conversions     = Conversions;
end

